import {Navigate, RouteObject} from "react-router-dom";
import {lazy} from "react";
import SongsDetail from "@/views/discover/c-views/album-detail";

const Ranking = lazy(()=>import("@/views/discover/c-views/rangking/index"))
const Songs = lazy(()=>import("@/views/discover/c-views/albums/index"))
const Artist = lazy(()=>import("@/views/discover/c-views/artist/index"))
const Mv = lazy(()=>import("@/views/discover/c-views/mv/index"))
const Discover = lazy(()=>import("@/views/discover"))
const Recommend = lazy(() => import('@/views/discover/c-views/recommend'))
const routes :Array<RouteObject> = [
    {
        path:"/",
        element:<Navigate to="/discover" />
    },
    {
        path:"/",
        element:<Discover />,
        children:[
            {
                path:"/discover",
                element:<Navigate to="/discover/recommend" />
            },
            {
                path:"/discover/recommend",
                element:<Recommend />
            },
            {
                path:"/discover/ranking",
                element:<Ranking />
            },
            {
                path:"/discover/songs",
                element:<Songs />
            },
            {
                path:"/discover/artist",
                element:<Artist />
            },
            {
                path:"/discover/mv",
                element:<Mv />
            },

        ]
    },
    {
        path:"/album-detail/:id",
        element:<SongsDetail />
    }
]
export default routes